program Lines;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
fin : textFile;
n, i, j, s, t : integer;
massx : array of integer;
massy : array of integer;
massa : array of integer;
massb : array of integer;
massc : array of integer;
massxx : array [0..100] of array [0..100] of integer;
massyy : array [0..100] of array [0..100] of integer;
begin
assignfile (fin, 'input.txt');
reset(fin);
readln(fin, n);
setlength (massx, 2*(n-1));
setlength (massy, 2*(n-1));
setlength (massa, n-1);
setlength (massb, n-1);
setlength (massc, n-1);

for i:=0 to n-1 do
begin
if (i mod 2 <> 0) then
begin
read(fin, massx[i]);
read(fin, massy[i]);
end;
if (i mod 2 = 0) or (i=0) then
begin
readln(fin, massx[i]);
read(fin, massy[i]);
end;
end;

for i:=0 to 2*(n-1)-1 do
begin
if ((i mod 2) = 0) then
begin
massa[i div 2]:=massy[i]-massy[i+1];
massb[i div 2]:=massx[i+1]-massx[i];
massc[i div 2]:=massx[i]*massy[i+1]+massx[i+1]*massy[i];
end;
end;

for i := 0 to n-1 do
begin
for j := 0 to n-1 do
begin
if (j>i) then
begin
massxx[i,j]:=(massc[j]*massb[i]-massc[i]*massb[j]) div (massa[i]*massb[j]-massa[j]*massb[i]);
massyy[i,j]:=-((massa[i]*massxx[i,j]+massc[i]) div massb[i]);
end;
end;
end;

for i:=0 to n-1 do
for j := 0 to n-1 do
if (j>i) then
begin
for s:=0 to n-1 do
for t:=0 to n-1 do
if (t>s) then
begin
if (massxx[i,j]=massxx[s,t]) then
if (massyy[i,j]=massyy[s,t]) then
begin
if (i<>s) and (j<>t) then
begin
massxx[i,j]:=0;
massyy[i,j]:=0;
end;
end;
end;
end;

for i:=0 to n-1 do
for j:= 0 to n-1 do
begin
if (j>i) and (massxx[i,j]<>0) then
begin
write(massxx[i,j]);
writeln(massyy[i,j]);
end;
end;

readln;
closefile(fin);
readln;
end.
